package com.huadi.bili_hot.service;

import com.huadi.bili_hot.dao.mapper.TimeAndViewMapper;
import com.huadi.bili_hot.entity.TimeAndView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TimeAndViewServiceImpl implements TimeAndViewService {
    @Autowired
    TimeAndViewMapper timeAndViewMapper;

    @Override
    public List<TimeAndView> getTimeAndView() {
        List<TimeAndView> timeAndViews = timeAndViewMapper.selectAll();
        for (int i = 0; i < timeAndViews.size(); i++) {
            int t = timeAndViews.get(i).getCi();
            timeAndViews.get(i).setCi(t*10);
        }
        return timeAndViews;
    }
}
